<?php
$subject = $this->subject;
$pois = $this->pois;
$poi_num = $this->poi_num;
if (!empty($pois)):
    if(!empty($poi_num) && $poi_num>7):
?>


    <TABLE cellSpacing='0' cellPadding='0' border='0' cellspacing='0'>
        <TBODY>
            <TR>
                <TD id="marquee_product1" vAlign=top>
                    <Table border='0' cellpadding='0' cellspacing='0'>
                        <TR>
                        <?php
                        foreach ($pois as $Poi):
                        ?>
                            <td>
                                <a href="<?php echo $this->getUrl(array('id' => $Poi->getId()), 'card', 'shop', 'customer') ?>">
                                    <span><img src="<?php echo $this->getStorefrontPicture($Poi->getRoadId(), $Poi->getStorefrontPicture()) ?>" width="120" height="100" /></span>
                                    <label><?php echo mb_substr($Poi['shop_name'], 0, 10) ?></label>
                                </a>
                            </td>
                        <?php endforeach; ?>
                        </TR>
                    </Table>
                </TD>

                <TD id="marquee_product2" vAlign=top>&nbsp;</TD>
            </TR>
        </TBODY></TABLE>
<?php   
    endif;
    if(empty($poi_num) || $poi_num <=7):
    ?>

    <ul>
    <?php
            $maxIndex = min(count($pois), 7);
            for ($i = 0; $i < $maxIndex; $i++):
                $poi = $pois[$i];
    ?>
            <li>
                <a href="<?php echo $this->getUrl(array('id' => $poi->getId()), 'card', 'shop', 'customer') ?>"> <span><img src="<?php echo $this->getStorefrontPicture($poi->getRoadId(), $poi->getStorefrontPicture()) ?>" width="118" height="99" /></span></a>
                <label><a href="<?php echo $this->getUrl(array('id' => $poi->getId()), 'card', 'shop', 'customer') ?>"><?php echo mb_substr($poi['shop_name'], 0, 9) ?></a></label>
            </li>
    <?php
            endfor;
    ?>
</ul>
<?php
        endif;
        endif;
?>